﻿<?xml version="1.0" encoding="utf-8"?>
<xsd:schema id="MicrosoftDataEntityDesignSchema" targetNamespace="http://schemas.microsoft.com/dsltools/MicrosoftDataEntityDesign" elementFormDefault="qualified" xmlns="http://schemas.microsoft.com/dsltools/MicrosoftDataEntityDesign" xmlns:core="http://schemas.microsoft.com/VisualStudio/2008/DslTools/Core" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <xsd:import id="CoreSchema" namespace="http://schemas.microsoft.com/VisualStudio/2008/DslTools/Core" />
  <!-- NameableItem -->
  <xsd:element name="nameableItem" abstract="true" type="NameableItem" substitutionGroup="core:modelElement" />
  <xsd:complexType name="NameableItem" abstract="true" >
    <xsd:complexContent>
      <xsd:extension base="core:ModelElement">
        <!-- Property: Name -->
        <xsd:attribute name="name" type="xsd:string" />
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  
  <!-- NameableItem Moniker -->
  <xsd:element name="nameableItemMoniker" abstract="true" type="NameableItemMoniker" substitutionGroup="core:modelElementMoniker" />
  <xsd:complexType name="NameableItemMoniker">
    <xsd:annotation>
      <xsd:documentation>Moniker for NameableItem instance.</xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="core:ModelElementMoniker">
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  
  <!-- EntityDesignerViewModel -->
  <xsd:element name="entityDesignerViewModel" type="EntityDesignerViewModel" substitutionGroup="core:modelElement" />
  <xsd:complexType name="EntityDesignerViewModel">
    <xsd:complexContent>
      <xsd:extension base="core:ModelElement">
        <xsd:sequence minOccurs="0" maxOccurs="1">
          <!-- Relationship: EntityDesignerViewModelHasEntityTypes -->
          <xsd:element name="entityTypes" minOccurs="0" maxOccurs="1">
            <xsd:annotation>
              <xsd:documentation>Instances of EntityDesignerViewModelHasEntityTypes</xsd:documentation>
            </xsd:annotation>
            <xsd:complexType>
              <xsd:sequence>
                <xsd:choice minOccurs="0" maxOccurs="unbounded" >
                  <xsd:element ref="entityDesignerViewModelHasEntityTypes">
                    <xsd:annotation>
                      <xsd:documentation>[Relationship deriving from EntityDesignerViewModelHasEntityTypes needs to be serialized in full-form]</xsd:documentation>
                    </xsd:annotation>
                  </xsd:element>
                  <xsd:element ref="entityType" >
                    <xsd:annotation>
                      <xsd:documentation>[Target role-player]</xsd:documentation>
                    </xsd:annotation>
                  </xsd:element>
                </xsd:choice>
              </xsd:sequence>
            </xsd:complexType>
          </xsd:element>
        </xsd:sequence>
        <!-- Id -->
        <xsd:attribute name="Id" type="xsd:string">
          <xsd:annotation>
            <xsd:documentation>Instance Guid of this element, needed because SerializeId is set to true.</xsd:documentation>
          </xsd:annotation>
        </xsd:attribute>
        <!-- dslVersion -->
        <xsd:attribute name="dslVersion" type="xsd:string">
          <xsd:annotation>
            <xsd:documentation>Version of the model serialized in this file.</xsd:documentation>
          </xsd:annotation>
        </xsd:attribute>
        <!-- Property: Namespace -->
        <xsd:attribute name="namespace" type="xsd:string" />
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  
  <!-- EntityDesignerViewModel Moniker -->
  <xsd:element name="entityDesignerViewModelMoniker" type="EntityDesignerViewModelMoniker" substitutionGroup="core:modelElementMoniker" />
  <xsd:complexType name="EntityDesignerViewModelMoniker">
    <xsd:annotation>
      <xsd:documentation>Moniker for EntityDesignerViewModel instance.</xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="core:ModelElementMoniker">
        <xsd:attribute name="Id" type="xsd:string" >
          <xsd:annotation>
            <xsd:documentation>Attribute to store the moniker string.</xsd:documentation>
          </xsd:annotation>
        </xsd:attribute>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  
  <!-- EntityType -->
  <xsd:element name="entityType" type="EntityType" substitutionGroup="nameableItem" />
  <xsd:complexType name="EntityType">
    <xsd:complexContent>
      <xsd:extension base="NameableItem">
        <xsd:sequence minOccurs="0" maxOccurs="1">
          <!-- Relationship: EntityTypeHasProperties -->
          <xsd:element name="properties" minOccurs="0" maxOccurs="1">
            <xsd:annotation>
              <xsd:documentation>Instances of EntityTypeHasProperties</xsd:documentation>
            </xsd:annotation>
            <xsd:complexType>
              <xsd:sequence>
                <xsd:choice minOccurs="0" maxOccurs="unbounded" >
                  <xsd:element ref="entityTypeHasProperties">
                    <xsd:annotation>
                      <xsd:documentation>[Relationship deriving from EntityTypeHasProperties needs to be serialized in full-form]</xsd:documentation>
                    </xsd:annotation>
                  </xsd:element>
                  <xsd:element ref="property" >
                    <xsd:annotation>
                      <xsd:documentation>[Target role-player]</xsd:documentation>
                    </xsd:annotation>
                  </xsd:element>
                </xsd:choice>
              </xsd:sequence>
            </xsd:complexType>
          </xsd:element>
          <!-- Relationship: Association -->
          <xsd:element name="associationTargets" minOccurs="0" maxOccurs="1">
            <xsd:annotation>
              <xsd:documentation>Instances of Association</xsd:documentation>
            </xsd:annotation>
            <xsd:complexType>
              <xsd:sequence>
                <xsd:element ref="association" minOccurs="0" maxOccurs="unbounded">
                  <xsd:annotation>
                    <xsd:documentation>[Instance of Association needs to be serialized in full-form]</xsd:documentation>
                  </xsd:annotation>
                </xsd:element>
              </xsd:sequence>
            </xsd:complexType>
          </xsd:element>
          <!-- Relationship: EntityTypeHasNavigationProperties -->
          <xsd:element name="navigationProperties" minOccurs="0" maxOccurs="1">
            <xsd:annotation>
              <xsd:documentation>Instances of EntityTypeHasNavigationProperties</xsd:documentation>
            </xsd:annotation>
            <xsd:complexType>
              <xsd:sequence>
                <xsd:choice minOccurs="0" maxOccurs="unbounded" >
                  <xsd:element ref="entityTypeHasNavigationProperties">
                    <xsd:annotation>
                      <xsd:documentation>[Relationship deriving from EntityTypeHasNavigationProperties needs to be serialized in full-form]</xsd:documentation>
                    </xsd:annotation>
                  </xsd:element>
                  <xsd:element ref="navigationProperty" >
                    <xsd:annotation>
                      <xsd:documentation>[Target role-player]</xsd:documentation>
                    </xsd:annotation>
                  </xsd:element>
                </xsd:choice>
              </xsd:sequence>
            </xsd:complexType>
          </xsd:element>
          <!-- Relationship: Inheritance -->
          <xsd:element name="derivedTypes" minOccurs="0" maxOccurs="1">
            <xsd:annotation>
              <xsd:documentation>Instances of Inheritance</xsd:documentation>
            </xsd:annotation>
            <xsd:complexType>
              <xsd:sequence>
                <xsd:choice minOccurs="0" maxOccurs="unbounded" >
                  <xsd:element ref="inheritance">
                    <xsd:annotation>
                      <xsd:documentation>[Relationship deriving from Inheritance needs to be serialized in full-form]</xsd:documentation>
                    </xsd:annotation>
                  </xsd:element>
                  <xsd:element ref="entityTypeMoniker" >
                    <xsd:annotation>
                      <xsd:documentation>[Target role-player]</xsd:documentation>
                    </xsd:annotation>
                  </xsd:element>
                </xsd:choice>
              </xsd:sequence>
            </xsd:complexType>
          </xsd:element>
        </xsd:sequence>
        <!-- Id -->
        <xsd:attribute name="Id" type="xsd:string">
          <xsd:annotation>
            <xsd:documentation>Instance Guid of this element, needed because SerializeId is set to true.</xsd:documentation>
          </xsd:annotation>
        </xsd:attribute>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  
  <!-- EntityType Moniker -->
  <xsd:element name="entityTypeMoniker" type="EntityTypeMoniker" substitutionGroup="nameableItemMoniker" />
  <xsd:complexType name="EntityTypeMoniker">
    <xsd:annotation>
      <xsd:documentation>Moniker for EntityType instance.</xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="NameableItemMoniker">
        <xsd:attribute name="Id" type="xsd:string" >
          <xsd:annotation>
            <xsd:documentation>Attribute to store the moniker string.</xsd:documentation>
          </xsd:annotation>
        </xsd:attribute>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  
  <!-- Property -->
  <xsd:element name="property" abstract="true" type="Property" substitutionGroup="propertyBase" />
  <xsd:complexType name="Property" abstract="true" >
    <xsd:complexContent>
      <xsd:extension base="PropertyBase">
        <!-- Property: Type -->
        <xsd:attribute name="type" type="xsd:string" >
          <xsd:annotation>
            <xsd:documentation>Specifies the EDM type of this property. The property window only displays facets specific to this type.</xsd:documentation>
          </xsd:annotation>
        </xsd:attribute>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  
  <!-- Property Moniker -->
  <xsd:element name="propertyMoniker" abstract="true" type="PropertyMoniker" substitutionGroup="propertyBaseMoniker" />
  <xsd:complexType name="PropertyMoniker">
    <xsd:annotation>
      <xsd:documentation>Moniker for Property instance.</xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="PropertyBaseMoniker">
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  
  <!-- PropertyBase -->
  <xsd:element name="propertyBase" abstract="true" type="PropertyBase" substitutionGroup="nameableItem" />
  <xsd:complexType name="PropertyBase" abstract="true" >
    <xsd:complexContent>
      <xsd:extension base="NameableItem">
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  
  <!-- PropertyBase Moniker -->
  <xsd:element name="propertyBaseMoniker" abstract="true" type="PropertyBaseMoniker" substitutionGroup="nameableItemMoniker" />
  <xsd:complexType name="PropertyBaseMoniker">
    <xsd:annotation>
      <xsd:documentation>Moniker for PropertyBase instance.</xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="NameableItemMoniker">
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  
  <!-- NavigationProperty -->
  <xsd:element name="navigationProperty" type="NavigationProperty" substitutionGroup="propertyBase" />
  <xsd:complexType name="NavigationProperty">
    <xsd:complexContent>
      <xsd:extension base="PropertyBase">
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  
  <!-- NavigationProperty Moniker -->
  <xsd:element name="navigationPropertyMoniker" abstract="true" type="NavigationPropertyMoniker" substitutionGroup="propertyBaseMoniker" />
  <xsd:complexType name="NavigationPropertyMoniker">
    <xsd:annotation>
      <xsd:documentation>Moniker for NavigationProperty instance.</xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="PropertyBaseMoniker">
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  
  <!-- ComplexProperty -->
  <xsd:element name="complexProperty" type="ComplexProperty" substitutionGroup="property" />
  <xsd:complexType name="ComplexProperty">
    <xsd:complexContent>
      <xsd:extension base="Property">
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  
  <!-- ComplexProperty Moniker -->
  <xsd:element name="complexPropertyMoniker" abstract="true" type="ComplexPropertyMoniker" substitutionGroup="propertyMoniker" />
  <xsd:complexType name="ComplexPropertyMoniker">
    <xsd:annotation>
      <xsd:documentation>Moniker for ComplexProperty instance.</xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="PropertyMoniker">
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  
  <!-- ScalarProperty -->
  <xsd:element name="scalarProperty" type="ScalarProperty" substitutionGroup="property" />
  <xsd:complexType name="ScalarProperty">
    <xsd:complexContent>
      <xsd:extension base="Property">
        <!-- Property: EntityKey -->
        <xsd:attribute name="entityKey" type="xsd:boolean" />
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  
  <!-- ScalarProperty Moniker -->
  <xsd:element name="scalarPropertyMoniker" abstract="true" type="ScalarPropertyMoniker" substitutionGroup="propertyMoniker" />
  <xsd:complexType name="ScalarPropertyMoniker">
    <xsd:annotation>
      <xsd:documentation>Moniker for ScalarProperty instance.</xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="PropertyMoniker">
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  
  <!-- EntityTypeHasProperties -->
  <xsd:element name="entityTypeHasProperties" abstract="true" type="EntityTypeHasProperties" substitutionGroup="core:modelElement" />
  <xsd:complexType name="EntityTypeHasProperties" abstract="true" >
    <xsd:complexContent>
      <xsd:extension base="core:ModelElement">
        <xsd:sequence minOccurs="0" maxOccurs="1">
          <!-- Target end Property -->
          <xsd:element ref="property" minOccurs="1" maxOccurs="1">
            <xsd:annotation>
              <xsd:documentation>[Target role-player]</xsd:documentation>
            </xsd:annotation>
          </xsd:element>
        </xsd:sequence>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  
  <!-- EntityTypeHasProperties Moniker -->
  <xsd:element name="entityTypeHasPropertiesMoniker" abstract="true" type="EntityTypeHasPropertiesMoniker" substitutionGroup="core:modelElementMoniker" />
  <xsd:complexType name="EntityTypeHasPropertiesMoniker">
    <xsd:annotation>
      <xsd:documentation>Moniker for EntityTypeHasProperties instance.</xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="core:ModelElementMoniker">
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  
  <!-- EntityDesignerViewModelHasEntityTypes -->
  <xsd:element name="entityDesignerViewModelHasEntityTypes" abstract="true" type="EntityDesignerViewModelHasEntityTypes" substitutionGroup="core:modelElement" />
  <xsd:complexType name="EntityDesignerViewModelHasEntityTypes" abstract="true" >
    <xsd:complexContent>
      <xsd:extension base="core:ModelElement">
        <xsd:sequence minOccurs="0" maxOccurs="1">
          <!-- Target end EntityType -->
          <xsd:element ref="entityType" minOccurs="1" maxOccurs="1">
            <xsd:annotation>
              <xsd:documentation>[Target role-player]</xsd:documentation>
            </xsd:annotation>
          </xsd:element>
        </xsd:sequence>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  
  <!-- EntityDesignerViewModelHasEntityTypes Moniker -->
  <xsd:element name="entityDesignerViewModelHasEntityTypesMoniker" abstract="true" type="EntityDesignerViewModelHasEntityTypesMoniker" substitutionGroup="core:modelElementMoniker" />
  <xsd:complexType name="EntityDesignerViewModelHasEntityTypesMoniker">
    <xsd:annotation>
      <xsd:documentation>Moniker for EntityDesignerViewModelHasEntityTypes instance.</xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="core:ModelElementMoniker">
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  
  <!-- Association -->
  <xsd:element name="association" type="Association" substitutionGroup="core:modelElement" />
  <xsd:complexType name="Association">
    <xsd:complexContent>
      <xsd:extension base="core:ModelElement">
        <xsd:sequence minOccurs="0" maxOccurs="1">
          <!-- Target end EntityType -->
          <xsd:element ref="entityTypeMoniker" minOccurs="1" maxOccurs="1">
            <xsd:annotation>
              <xsd:documentation>[Target role-player]</xsd:documentation>
            </xsd:annotation>
          </xsd:element>
        </xsd:sequence>
        <!-- Id -->
        <xsd:attribute name="Id" type="xsd:string">
          <xsd:annotation>
            <xsd:documentation>Instance Guid of this element, needed because SerializeId is set to true.</xsd:documentation>
          </xsd:annotation>
        </xsd:attribute>
        <!-- Property: Name -->
        <xsd:attribute name="name" type="xsd:string" >
          <xsd:annotation>
            <xsd:documentation>Name</xsd:documentation>
          </xsd:annotation>
        </xsd:attribute>
        <!-- Property: SourceMultiplicity -->
        <xsd:attribute name="sourceMultiplicity" type="xsd:string" >
          <xsd:annotation>
            <xsd:documentation>Computed source display text</xsd:documentation>
          </xsd:annotation>
        </xsd:attribute>
        <!-- Property: TargetMultiplicity -->
        <xsd:attribute name="targetMultiplicity" type="xsd:string" >
          <xsd:annotation>
            <xsd:documentation>Computed target display text</xsd:documentation>
          </xsd:annotation>
        </xsd:attribute>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  
  <!-- Association Moniker -->
  <xsd:element name="associationMoniker" type="AssociationMoniker" substitutionGroup="core:modelElementMoniker" />
  <xsd:complexType name="AssociationMoniker">
    <xsd:annotation>
      <xsd:documentation>Moniker for Association instance.</xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="core:ModelElementMoniker">
        <xsd:attribute name="Id" type="xsd:string" >
          <xsd:annotation>
            <xsd:documentation>Attribute to store the moniker string.</xsd:documentation>
          </xsd:annotation>
        </xsd:attribute>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  
  <!-- EntityTypeHasNavigationProperties -->
  <xsd:element name="entityTypeHasNavigationProperties" abstract="true" type="EntityTypeHasNavigationProperties" substitutionGroup="core:modelElement" />
  <xsd:complexType name="EntityTypeHasNavigationProperties" abstract="true" >
    <xsd:complexContent>
      <xsd:extension base="core:ModelElement">
        <xsd:sequence minOccurs="0" maxOccurs="1">
          <!-- Target end NavigationProperty -->
          <xsd:element ref="navigationProperty" minOccurs="1" maxOccurs="1">
            <xsd:annotation>
              <xsd:documentation>[Target role-player]</xsd:documentation>
            </xsd:annotation>
          </xsd:element>
        </xsd:sequence>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  
  <!-- EntityTypeHasNavigationProperties Moniker -->
  <xsd:element name="entityTypeHasNavigationPropertiesMoniker" abstract="true" type="EntityTypeHasNavigationPropertiesMoniker" substitutionGroup="core:modelElementMoniker" />
  <xsd:complexType name="EntityTypeHasNavigationPropertiesMoniker">
    <xsd:annotation>
      <xsd:documentation>Moniker for EntityTypeHasNavigationProperties instance.</xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="core:ModelElementMoniker">
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  
  <!-- Inheritance -->
  <xsd:element name="inheritance" abstract="true" type="Inheritance" substitutionGroup="core:modelElement" />
  <xsd:complexType name="Inheritance" abstract="true" >
    <xsd:complexContent>
      <xsd:extension base="core:ModelElement">
        <xsd:sequence minOccurs="0" maxOccurs="1">
          <!-- Target end EntityType -->
          <xsd:element ref="entityTypeMoniker" minOccurs="1" maxOccurs="1">
            <xsd:annotation>
              <xsd:documentation>[Target role-player]</xsd:documentation>
            </xsd:annotation>
          </xsd:element>
        </xsd:sequence>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  
  <!-- Inheritance Moniker -->
  <xsd:element name="inheritanceMoniker" abstract="true" type="InheritanceMoniker" substitutionGroup="core:modelElementMoniker" />
  <xsd:complexType name="InheritanceMoniker">
    <xsd:annotation>
      <xsd:documentation>Moniker for Inheritance instance.</xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="core:ModelElementMoniker">
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  
</xsd:schema>

